/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.fandi.util;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JDesktopPane;

/**
 *
 * @author fandiak
 */
public class CustomJDesktopPane extends JDesktopPane {
    @Override
    protected void paintComponent(Graphics graph) {
        Graphics2D g2D = (Graphics2D) graph.create();
        Image image = new ImageIcon(getClass().getResource("/com/fandi/resources/background.jpg")).getImage();
        
        g2D.drawImage(image, 0, 0, getWidth(), getHeight(), null);
        g2D.dispose();
    }
}
